<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"/><title>Module: Gosu</title><link type="text/css" href=".././rdoc-style.css" rel="stylesheet" media="screen"/><script type="text/javascript">
// Allison template
// Copyright 2007, 2008 Cloudburst, LLC. Licensed under the AFL 3. See the included LICENSE file.

var href_base = '.././rdoc-style.css'.replace(/(.*\/).*/, '$1'); // inline js is good for something  

function $(id) {
    if (document.getElementById)
      elem = document.getElementById(id);
    else if ( document.all )
      elem = eval("document.all." + id);
    else
      return false;
    return elem;
}

  function toggle(id) {
    elem = $(id);
    elemStyle = elem.style;   
    if (elemStyle.display == "block") {
      elemStyle.display = "none"
    } else {
      elemStyle.display = "block"
    }
    return true;
  }

  function toggleText(id) {
    elem = $(id)
    if (m = elem.innerHTML.match(/(Hide)(.*)/)) {
      elem.innerHTML = "Show" + m[2];
    } else if (m = elem.innerHTML.match(/(Show)(.*)/)) {
      elem.innerHTML = "Hide" + m[2];
    }
    return true;
  }

function span(s, klass) {
  return '<span class="' + klass + '">' + s + '</span>';
}
  
function highlightSymbols() {
  pres = document.getElementsByTagName('pre');
  for(var i = 0; i < pres.length; i++) {
    pre = pres[i];
    spans = pre.getElementsByTagName('span');
    for(var k = 0; k < spans.length; k++) {
      span = spans[k];
      if (span.className.match(/ruby-identifier/)) {
        if (span.innerHTML.match(/^:/)) {
          span.className += " ruby-symbol";
        }
      }
    }
  }
}

 function hasClass(obj) {
     var result = false;
     if (obj.getAttributeNode("class") != null) {
         result = obj.getAttributeNode("class").value;
     }
     return result;
  }   

 function stripe() {
    var even = true;
    var color = "#e4ebed";
    var tables = document.getElementsByTagName('table');
    if (tables.length == 0) { return; }
    for (var h = 0; h < tables.length; h++) {
        var trs = tables[h].getElementsByTagName("tr");
        for (var i = 0; i < trs.length; i++) {
          var tds = trs[i].getElementsByTagName("td");
            for (var j = 0; j < tds.length; j++) {       
              if (hasClass(tds[j]) != "first") {                
              var mytd = tds[j];
              if (even) {
                mytd.style.backgroundColor = color;
              }         
            }
          }
          even =  ! even;
      }
    }
  }
  
function ajaxGet(url) {
  url = (href_base + url).replace('/./', '/')
  var req = false;

  if (window.ActiveXObject) {
    try {
      // stupid hack because IE7 disables local Ajax with the native xmlhttprequest object
      // for security purposes. Yet ActiveX still works. Thanks, Microsoft. I hate you. Die.
      req = new ActiveXObject("MSXML2.XMLHTTP.3.0");
    } catch (e) {
      try {
        /* IE 6 and maybe 5, don't know, don't care */
        req = new ActiveXObject("Msxml2.XMLHTTP");
      } catch (e) {
        try {
          req = new ActiveXObject("Microsoft.XMLHTTP");
        } catch (e) {
          req = false;
        }
      }
    }
  }
    
  /* real browsers */
  if (!req && window.XMLHttpRequest) {
    try {
      req = new XMLHttpRequest();
    } catch (e) {
      req = false;
    }
  } 
  
  if (req) {
    req.open('GET', url, false);
    req.send(null);
    return req.responseText;
  } else {
    return "Ajax error";  
  }
}


function addEvent(elm, evType, fn, useCapture) {
	if (elm.addEventListener) {
	  elm.addEventListener(evType, fn, useCapture);  
  	return true;
	} else if (elm.attachEvent) {
  	var r = elm.attachEvent('on' + evType, fn);  
	  return r;  
	} else {
  	elm['on' + evType] = fn;
	}
}

function insertIndices() {
  pages = ["class", "file", "method"]
  for (x in pages) { 
    $(pages[x]).innerHTML += ajaxGet('fr_' + pages[x] + '_index.html').replace(/(href=")/g, '$1' + href_base);
  }
  /* mouseoverify method links */
  links = $('method').getElementsByTagName('a');
  for (var x = 0; x < links.length; x++) {
    if (m = links[x].innerHTML.match(/(.*)\s\((.*)\)/)) {
      links[x].innerHTML = m[1] + '<br>';
      links[x].title = m[2];
    }
  }
  /* this is stupid */
  $('class').style.display = "block";
  $('file').style.display = "block";
  
  /* has to be here because IE7 does not guarantee the onLoad callback order */
  abbreviateIndicesInner(["class", "file"], 25, "a");
  /* same, linkTitle() depends on the class link list */
  linkTitle();
}

function abbreviateIndices() {
  var ids = ["defined_in", "child_of", "includes", "requires", "method", "methods"];
  abbreviateIndicesInner(ids, 25, 'a');
  abbreviateIndicesInner(ids, 25, 'span');
}

function abbreviateIndicesInner(indices, amount, tag) {
  for (var x = 0; x < indices.length; x++) { 
    var the_index = $(indices[x]);
    if (the_index) {
      links = the_index.getElementsByTagName(tag);
      for (var y = 0; y < links.length; y++) {
        var link = links[y];
        if (link.getElementsByTagName('span').length == 0 && link.getElementsByTagName('a').length == 0) {
          // avoid nesting
          link.innerHTML = link.innerHTML.replace(/<br>|\n/gi, '');
          link.title = link.innerHTML;
          link.innerHTML = abbreviate(link.innerHTML, amount) + '<br>';
        }
      }
    }
  }
}

function linkTitle() {
  
  /* grab the correct title element from the index */
  var index_page = ajaxGet('index.html');
  title_text = index_page.match(/<title>(.*)<\/title>/m)[1];
  document.title = title_text + " - " + document.title;
  var p = $('header').getElementsByTagName('p')[0]
  if (p.innerHTML.match(/^\s*$/)) {
    p.innerHTML = title_text;
  } else {
    p.innerHTML = title_text + ": " + p.innerHTML;
  }
  
  /* set the link properly */
  title_link = index_page.match(/<a\s+href="(.*?)"/)[1];
  var element = $('title');
  var item_type = "";
  var item_name = "";
  if (m = element.innerHTML.match(/(Class:|Module:|File:)\s*(.*)/)) {
    item_type = m[1];
    item_name = m[2];
  } else {
    item_name = element.innerHTML;
  }
  element.innerHTML = '<a href="' + href_base + title_link + '">' + item_type + " " + abbreviate(item_name, 45) + '</a>';
  element.getElementsByTagName('a')[0].title = item_name
  
  /* breadcrumb navigation */
  items = item_name.split("::");
  items_new = item_name.split("::");
  file_links = $('class').getElementsByTagName('a');
  for (var x = 0; x < items.length - 1; x++ ){
    var item = items[x];
    link = ("/classes/" + items.slice(0,x).join("/") + "/" + item + ".html").replace('//', '/');
    regex = new RegExp(RegExp.escape(link) + '$');
    for (var y = 0; y < file_links.length; y++) {
      if (file_links[y].href.match(regex)) {
         items_new[x] = '<a href="' + href_base + link + '">' + item + '</a>';
         break;
      }
    }  
  }
  $('item_name').innerHTML = item_type + ' ' + items_new.join(" :: ");
}

function abbreviate(s, size) {
  // Try to get rid of path and extension in any case. These are not
  // even interesting if there is enough space.
  
  s = s.replace(/\..*$/, '');
  s = s.replace(/.*\//g, '');
  
  // Now this is a blatant hack.
  
  if (s == 'gosu')
    return ''; // Noone will ever see the link, harhar!

  while (s.length > size) {
    var old_s = s;
    s = s.replace(/\s|\n/mg, '');
    s = s.replace(/([A-Z])[a-z]+/m, '$1');
    if (!s || old_s == s) {
      return "..." + s.substring(s.length - size, s.length);
    }
  }
  return s;
}

function disableSubmit(event) {
  var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
  if (keyCode == 13) {
    return false;
  } else {
    return true;
  }
}
  
function filterList(id, s, event) {
  
  /* some weak escaping */
  s = s.replace(/[^\w\d\.\_\-\/\:\=\[\]\?\!]/g, '');
  s = RegExp.escape(s);
  
  var show_all = false;
  if (s.match(/^\s*$/)) {
    show_all = true;
  }
  
  links = $(id).getElementsByTagName('a')
  regex = new RegExp(s, 'i');
  
  for (var x = 0; x < links.length; x++) {
    var link = links[x];
    if (show_all) {
      link.style.display = 'inline';
    } else {
       if (link.innerHTML.match(regex)) {        
         link.style.display = 'inline';
       } else {
         link.style.display = 'none';
       }
    }
  }
  return true;
}

RegExp.escape = function(text) {
  if (!arguments.callee.sRE) {
    var specials = ['/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\'];
    arguments.callee.sRE = new RegExp(
      '(\\' + specials.join('|\\') + ')', 'g'
    );
  }
  return text.replace(arguments.callee.sRE, '\\$1');
}

function hacks() {
  // show the spacer if necessary, 
  divs = document.getElementsByTagName('div');
  for(var x = 0; x < divs.length; x++) {
    if (divs[x].className && divs[x].className.match(/top/)) {
      document.getElementById('spacer').style.display = 'block';
    }
  }
  // remove extra colons from tables
  tds = document.getElementsByTagName('td');
  for(var x = 0; x < tds.length; x++) {
    str = tds[x].innerHTML
    if (str.charAt(str.length - 1) == ":") {
      tds[x].innerHTML = str.slice(0, str.length - 1)
    }
  }
}

addEvent(window, 'load', insertIndices, false);
addEvent(window, 'load', abbreviateIndices, false);
addEvent(window, 'load', stripe, false);
addEvent(window, 'load', highlightSymbols, false);
addEvent(window, 'load', hacks, false);
</script></head><body><div id="container"><div class="curve" id="preheader_curve_0"></div><div class="curve" id="preheader_curve_1"></div><div class="curve" id="preheader_curve_2"></div><div class="curve" id="preheader_curve_3"></div><div class="curve" id="preheader_curve_4"></div><div class="curve" id="preheader_curve_5"></div><div id="header"><span><h1 id="title">
Module: Gosu
</h1></span></div><div class="clear"></div><div id="left">

<div class="navigation darker top" id="defined_in"><h3>Defined in</h3>

<a href="../files/reference/gosu_rb.html">reference/gosu.rb</a>

</div>



<div class="navigation top" id="methods"><h3>Methods</h3>


<a href='#M000008'>
angle<br/>
</a>




<a href='#M000009'>
angle_diff<br/>
</a>




<a href='#M000012'>
default_font_name<br/>
</a>




<a href='#M000010'>
distance<br/>
</a>




<a href='#M000011'>
milliseconds<br/>
</a>




<a href='#M000006'>
offset_x<br/>
</a>




<a href='#M000007'>
offset_y<br/>
</a>




<a href='#M000005'>
random<br/>
</a>




<a href='#M000014'>
screen_height<br/>
</a>




<a href='#M000013'>
screen_width<br/>
</a>


</div>
<div id="spacer"></div><div class="navigation darker index" id="class_wrapper"><div class="list_header"><h3>All classes</h3></div><div class="list_header_link"><a href="#" onclick="toggle('class'); toggleText('class_link'); return false;" id="class_link">Hide...</a></div><div class="clear"></div><div id="class"><form><label for="filter_class">Filter:&nbsp;&nbsp;</label><input type="text" onKeyUp="return filterList('class', this.value, event);" onKeyPress="return disableSubmit(event);" id="filter_class"></input></form></div></div><div class="navigation darker index" id="file_wrapper"><div class="list_header"><h3>All files</h3></div><div class="list_header_link"><a href="#" onclick="toggle('file'); toggleText('file_link'); return false;" id="file_link">Hide...</a></div><div class="clear"></div><div id="file"><form><label for="filter_file">Filter:&nbsp;&nbsp;</label><input type="text" onKeyUp="return filterList('file', this.value, event);" onKeyPress="return disableSubmit(event);" id="filter_file"></input></form></div></div><div class="navigation darker index" id="method_wrapper"><div class="list_header"><h3>All methods</h3></div><div class="list_header_link"><a href="#" onclick="toggle('method'); toggleText('method_link'); return false;" id="method_link">Show...</a></div><div class="clear"></div><div id="method"><form><label for="filter_method">Filter:&nbsp;&nbsp;</label><input type="text" onKeyUp="return filterList('method', this.value, event);" onKeyPress="return disableSubmit(event);" id="filter_method"></input></form></div></div></div><div id="content">




<p></p>

<h1>Child modules and classes</h1><p>Class <a href="Gosu/Color.html" class="link">Gosu::Color</a><br />
Class <a href="Gosu/Font.html" class="link">Gosu::Font</a><br />
Class <a href="Gosu/GLTexInfo.html" class="link">Gosu::GLTexInfo</a><br />
Class <a href="Gosu/Image.html" class="link">Gosu::Image</a><br />
Class <a href="Gosu/Sample.html" class="link">Gosu::Sample</a><br />
Class <a href="Gosu/SampleInstance.html" class="link">Gosu::SampleInstance</a><br />
Class <a href="Gosu/Song.html" class="link">Gosu::Song</a><br />
Class <a href="Gosu/TextInput.html" class="link">Gosu::TextInput</a><br />
Class <a href="Gosu/Window.html" class="link">Gosu::Window</a><br />
</p>

<h1>Constants</h1><p><table><tr><th>Name</th><th>Value</th></tr>
<tr>
<td class="highlight">VERSION</td>

<td class="normal">:a_string</td>



</tr>
<tr>
<td class="highlight">MAJOR_VERSION</td>

<td class="normal">:a_fixnum</td>



</tr>
<tr>
<td class="highlight">MINOR_VERSION</td>

<td class="normal">:a_fixnum</td>



</tr>
<tr>
<td class="highlight">POINT_VERSION</td>

<td class="normal">:a_fixnum</td>



</tr>
<tr>
<td class="highlight">Kb0</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">Kb1</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">Kb2</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">Kb3</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">Kb4</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">Kb5</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">Kb6</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">Kb7</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">Kb8</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">Kb9</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbA</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbB</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbC</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbD</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbE</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbF</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbG</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbH</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbI</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbJ</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbK</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbL</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbM</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbN</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbO</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbP</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbQ</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbR</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbS</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbT</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbU</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbV</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbW</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbX</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbY</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbZ</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbBackspace</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbDelete</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbDown</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbEnd</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbEnter</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbEscape</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbF1</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbF10</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbF11</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbF12</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbF2</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbF3</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbF4</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbF5</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbF6</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbF7</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbF8</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbF9</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbHome</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbInsert</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbLeft</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbLeftAlt</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbLeftControl</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbLeftShift</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbNumpad0</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbNumpad1</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbNumpad2</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbNumpad3</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbNumpad4</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbNumpad5</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbNumpad6</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbNumpad7</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbNumpad8</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbNumpad9</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbNumpadAdd</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbNumpadDivide</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbNumpadMultiply</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbNumpadSubtract</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbPageDown</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbPageUp</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbReturn</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbRight</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbRightAlt</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbRightControl</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbRightShift</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbSpace</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbTab</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">KbUp</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">MsLeft</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">MsMiddle</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">MsRight</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">MsWheelDown</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">MsWheelUp</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">GpButton0</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">GpButton1</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">GpButton10</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">GpButton11</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">GpButton12</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">GpButton13</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">GpButton14</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">GpButton15</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">GpButton2</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">GpButton3</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">GpButton4</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">GpButton5</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">GpButton6</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">GpButton7</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">GpButton8</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">GpButton9</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">GpDown</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">GpLeft</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">GpRight</td>

<td class="normal">:implementation_defined</td>



</tr>
<tr>
<td class="highlight">GpUp</td>

<td class="normal">:implementation_defined</td>



</tr>
</table></p>




<h1>Public Instance Methods</h1>


<a class="small" name="M000008"><br/></a>
<div class="method_block"><h3>
<a href='#M000008'>


angle

(x1, y1, x2, y2)

</a>
</h3>
<p>
Returns the <a href="Gosu.html#M000008">angle</a> from point 1 to point 2
in degrees, where 0.0 means upwards. Returns 0 if both points are equal.
</p>

<p class="source_link" id="M000008-show-link"><a href="#" onclick="toggle('M000008-source'); toggleText('M000008-link'); return false;" id="M000008-link">Show source...</a></p><div class="source" id="M000008-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 456</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">angle</span>(<span class="ruby-identifier">x1</span>, <span class="ruby-identifier">y1</span>, <span class="ruby-identifier">x2</span>, <span class="ruby-identifier">y2</span>); <span class="ruby-keyword kw">end</span></pre></div>
</div>

<a class="small" name="M000009"><br/></a>
<div class="method_block"><h3>
<a href='#M000009'>


angle_diff

(angle1, angle2)

</a>
</h3>
<p>
Returns the smallest <a href="Gosu.html#M000008">angle</a> that can be
added to angle1 to get to angle2 (can be negative if counter-clockwise
movement is shorter).
</p>

<p class="source_link" id="M000009-show-link"><a href="#" onclick="toggle('M000009-source'); toggleText('M000009-link'); return false;" id="M000009-link">Show source...</a></p><div class="source" id="M000009-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 459</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">angle_diff</span>(<span class="ruby-identifier">angle1</span>, <span class="ruby-identifier">angle2</span>); <span class="ruby-keyword kw">end</span></pre></div>
</div>

<a class="small" name="M000012"><br/></a>
<div class="method_block"><h3>
<a href='#M000012'>


default_font_name

()

</a>
</h3>
<p>
Returns the name of a neutral font that is available on the current
platform.
</p>

<p class="source_link" id="M000012-show-link"><a href="#" onclick="toggle('M000012-source'); toggleText('M000012-link'); return false;" id="M000012-link">Show source...</a></p><div class="source" id="M000012-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 469</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">default_font_name</span>(); <span class="ruby-keyword kw">end</span></pre></div>
</div>

<a class="small" name="M000010"><br/></a>
<div class="method_block"><h3>
<a href='#M000010'>


distance

(x1, y1, x2, y2)

</a>
</h3>
<p>
Returns the <a href="Gosu.html#M000010">distance</a> between two points.
</p>

<p class="source_link" id="M000010-show-link"><a href="#" onclick="toggle('M000010-source'); toggleText('M000010-link'); return false;" id="M000010-link">Show source...</a></p><div class="source" id="M000010-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 462</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">distance</span>(<span class="ruby-identifier">x1</span>, <span class="ruby-identifier">y1</span>, <span class="ruby-identifier">x2</span>, <span class="ruby-identifier">y2</span>); <span class="ruby-keyword kw">end</span></pre></div>
</div>

<a class="small" name="M000011"><br/></a>
<div class="method_block"><h3>
<a href='#M000011'>


milliseconds

()

</a>
</h3>
<p>
Incrementing, possibly wrapping millisecond timer.
</p>

<p class="source_link" id="M000011-show-link"><a href="#" onclick="toggle('M000011-source'); toggleText('M000011-link'); return false;" id="M000011-link">Show source...</a></p><div class="source" id="M000011-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 465</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">milliseconds</span>(); <span class="ruby-keyword kw">end</span></pre></div>
</div>

<a class="small" name="M000006"><br/></a>
<div class="method_block"><h3>
<a href='#M000006'>


offset_x

(angle, dist)

</a>
</h3>
<p>
Returns the horizontal <a href="Gosu.html#M000010">distance</a> between the
origin and the point to which you would get if you moved radius pixels in
the direction specified by <a href="Gosu.html#M000008">angle</a>.
</p>

<p class="source_link" id="M000006-show-link"><a href="#" onclick="toggle('M000006-source'); toggleText('M000006-link'); return false;" id="M000006-link">Show source...</a></p><div class="source" id="M000006-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 450</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">offset_x</span>(<span class="ruby-identifier">angle</span>, <span class="ruby-identifier">dist</span>); <span class="ruby-keyword kw">end</span></pre></div>
</div>

<a class="small" name="M000007"><br/></a>
<div class="method_block"><h3>
<a href='#M000007'>


offset_y

(angle, dist)

</a>
</h3>
<p>
Returns the vertical <a href="Gosu.html#M000010">distance</a> between the
origin and the point to which you would get if you moved radius pixels in
the direction specified by <a href="Gosu.html#M000008">angle</a>.
</p>

<p class="source_link" id="M000007-show-link"><a href="#" onclick="toggle('M000007-source'); toggleText('M000007-link'); return false;" id="M000007-link">Show source...</a></p><div class="source" id="M000007-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 453</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">offset_y</span>(<span class="ruby-identifier">angle</span>, <span class="ruby-identifier">dist</span>); <span class="ruby-keyword kw">end</span></pre></div>
</div>

<a class="small" name="M000005"><br/></a>
<div class="method_block"><h3>
<a href='#M000005'>


random

(min, max)

</a>
</h3>
<p>
Returns a <a href="Gosu.html#M000005">random</a> double between min
(inclusive) and max (exclusive).
</p>

<p class="source_link" id="M000005-show-link"><a href="#" onclick="toggle('M000005-source'); toggleText('M000005-link'); return false;" id="M000005-link">Show source...</a></p><div class="source" id="M000005-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 447</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">random</span>(<span class="ruby-identifier">min</span>, <span class="ruby-identifier">max</span>); <span class="ruby-keyword kw">end</span></pre></div>
</div>

<a class="small" name="M000014"><br/></a>
<div class="method_block"><h3>
<a href='#M000014'>


screen_height

()

</a>
</h3>
<p>
Returns the height, in pixels, of the user&#8216;s primary screen.
</p>

<p class="source_link" id="M000014-show-link"><a href="#" onclick="toggle('M000014-source'); toggleText('M000014-link'); return false;" id="M000014-link">Show source...</a></p><div class="source" id="M000014-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 475</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">screen_height</span>(); <span class="ruby-keyword kw">end</span></pre></div>
</div>

<a class="small" name="M000013"><br/></a>
<div class="method_block"><h3>
<a href='#M000013'>


screen_width

()

</a>
</h3>
<p>
Returns the width, in pixels, of the user&#8216;s primary screen.
</p>

<p class="source_link" id="M000013-show-link"><a href="#" onclick="toggle('M000013-source'); toggleText('M000013-link'); return false;" id="M000013-link">Show source...</a></p><div class="source" id="M000013-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 472</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">screen_width</span>(); <span class="ruby-keyword kw">end</span></pre></div>
</div>





</div><div class="clear" id="footer">Allison 2 &copy; 2007 <a href="http://cloudbur.st">Cloudburst, LLC</a><br/>slightly adapted for the Gosu project by Julian Raschke</div></div></body></html>